﻿using AutoMapper;
using ProgrammingEducationSystem.Dto;
using ProgrammingEducationSystem.Models;

namespace ProgrammingEducationSystem.Profiles
{
    public class ClassRoomsProfile: Profile
    {
        public ClassRoomsProfile()
        {
            CreateMap<ClassRoomsProfile, ClassRoom>().ForMember
             (
                desc=>desc.Id,
                src=>src.MapFrom(
                    c=>Guid.NewGuid()
                    )
                );
            CreateMap<ClassRoomsForCreateDto, ClassRoom>();
            CreateMap<ClassRoomForUpdateDto, ClassRoom>();

        }
    }
}
